Skip to content

fix: modifier id duplicate#114

Merged
lonelyicer merged 1 commit intomainfrom
fix/modifier-id-duplicate
Mar 16, 2026
Merged

fix: modifier id duplicate#114
lonelyicer merged 1 commit intomainfrom
fix/modifier-id-duplicate

Conversation

@lonelyicer
Copy link
Copy Markdown
Member

Fix #105

Copilot AI review requested due to automatic review settings March 16, 2026 20:57
@github-actions
Copy link
Copy Markdown

Game Test Results

✅ Success

Metric Value
Total Tests 1
Passed 1
Failed 0
Duration 400.3 ms

Workflow run: #395

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates how artifact enhancement attribute modifiers are generated so their AttributeModifier IDs can be made unique per Curios slot/context, reducing modifier ID collisions when multiple artifacts are equipped.

Changes:

  • Pass the Curios-provided ResourceLocation id down into ArtifactEnhancementComponent when generating attribute modifiers.
  • Add an overloaded getAttributeModifiers(ResourceLocation curiosId) that rewrites modifier IDs to include the Curios identifier.
  • Prefix newly generated modifier keys with artifact_enhancement. to better namespace IDs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/main/java/com/altnoir/mia/common/item/abs/IEArtifact.java Threads the Curios id into artifact enhancement attribute modifier generation.
src/main/java/com/altnoir/mia/common/component/ArtifactEnhancementComponent.java Adds Curios-aware modifier ID rewriting and namespaces modifier key generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@lonelyicer lonelyicer merged commit 0921ea7 into main Mar 16, 2026
7 checks passed
@lonelyicer lonelyicer deleted the fix/modifier-id-duplicate branch March 16, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

可穿戴遗物属性BUG

2 participants